<template>
  <a-drawer
    width="45%"
    :title="formTitle"
    :label-col="4"
    :wrapper-col="14"
    :visible="open"
    :body-style="{ height: 'calc(100vh - 100px)', overflow: 'auto' }"
    @close="cancel"
  >
    <a-form-model ref="form" :model="form" :rules="rules" layout="vertical">
      <a-spin :spinning="spinning" :delay="delayTime" tip="Loading...">
        <a-row :gutter="32">
          <a-col :span="14">
            <a-row :gutter="32">
              <a-col :span="24">
                <a-form-model-item label="考核标题" prop="title">
                  <a-input v-model="form.title" placeholder="请输入标题" />
                </a-form-model-item>
              </a-col>
              <a-col :span="12">
                <a-form-model-item label="截止时间" prop="endTime">
                  <a-date-picker
                    v-model="form.endTime"
                    valueFormat="YYYY-MM-DD"
                    :show-today="true"
                    placeholder="选择日期"
                    width="100%"
                  />
                </a-form-model-item>
              </a-col>
              <a-col :span="12">
                <a-form-model-item label="文件上传" prop="">
                  <file-upload
                    :fileList="fileList"
                    @afterUpload="uploadCompleteFile"
                    @removeFile="handlerRemoveFile"
                  ></file-upload>
                </a-form-model-item>
              </a-col>
            </a-row>
          </a-col>
          <a-col
            :span="10"
            style="border-left: 1.5px solid #ecedee; height: calc(100vh - 45vh)"
          >
            <a-row :gutter="32">
              <a-col :span="24">
                <a-form-model-item label="选择考核对象" prop="">
                  <dept-tree
                    ref="deptTree"
                    :deptOptions="deptOptions"
                    :defalutExpandedKeys="expandedKeys"
                    :defalutCheckKeys="checkKeys"
                    @getCheckedKeys="handlerGetcheckedKeys"
                    @select="clickDeptNode"
                  />
                </a-form-model-item>
              </a-col>
            </a-row>
          </a-col>
        </a-row>
      </a-spin>
      <div class="bottom-control">
        <a-space>
          <a-button @click="cancel"> 取消 </a-button>
          <a-button type="primary" @click="submitForm"> 保存 </a-button>
        </a-space>
      </div>
    </a-form-model>
  </a-drawer>
</template>
<script>
import BizAssessInfoEditForm from "./BizAssessInfoForm";
export default {
  ...BizAssessInfoEditForm,
};
</script>
